//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package test.StringPractise;

public class StringPrecatiseFive {
    public StringPrecatiseFive() {
    }

    public static void main(String[] args) {
        long startTime = System.currentTimeMillis();
        System.out.println(moneyReverse("225785"));
        long endTime = System.currentTimeMillis();
        System.out.println("\n程序运行时间： " + (endTime - startTime) + "ms");
    }

    public static String moneyReverse(String str) {
        String newStr = "";
        int c = 7 - str.length();

        for(int i = 0; i < c; ++i) {
            str = "0" + str;
        }

        for(int i = 0; i < str.length(); ++i) {
            String var10000;
            switch (i) {
                case 0:
                    var10000 = "元" + newStr;
                    break;
                case 1:
                case 5:
                    var10000 = "拾" + newStr;
                    break;
                case 2:
                case 6:
                    var10000 = "佰" + newStr;
                    break;
                case 3:
                    var10000 = "仟" + newStr;
                    break;
                case 4:
                    var10000 = "万" + newStr;
                    break;
                default:
                    var10000 = newStr;
            }

            newStr = var10000;
            switch (str.charAt(str.length() - 1 - i)) {
                case '0' -> var10000 = "零" + newStr;
                case '1' -> var10000 = "壹" + newStr;
                case '2' -> var10000 = "贰" + newStr;
                case '3' -> var10000 = "叁" + newStr;
                case '4' -> var10000 = "肆" + newStr;
                case '5' -> var10000 = "伍" + newStr;
                case '6' -> var10000 = "陆" + newStr;
                case '7' -> var10000 = "柒" + newStr;
                case '8' -> var10000 = "捌" + newStr;
                case '9' -> var10000 = "玖" + newStr;
                default -> var10000 = newStr;
            }

            newStr = var10000;
        }

        return newStr;
    }
}
